<%--
  Created by IntelliJ IDEA.
  User: user
  Date: 2022/4/29
  Time: 16:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <!-- 使用bootstrap的js文件前要先引入jquery -->
    <script src="../../js/jquery.slim.min.js"></script>
    <!-- 最新版本的 Bootstrap 核心js文件 -->
    <script src="../../js/bootstrap.bundle.min.js"></script>
</head>
<body>
<%--在表格上面加上搜索框，以及新增/清空按钮--%>
<form action="getUserInfoServlet" method="post">
    <div class="container" style="margin-top:20px;">
        <div class="row">
            <div class="col col-lg-6">
                <div class="form-group">
                   <input type="text" name="username" placeholder="请输入用户名" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
                </div>
            </div>
            <div class="col col-lg-6">
                <div class="form-group">
                    <button type="submit" class="btn btn-primary">搜索</button>
                    <a class="btn btn-success" href="jump?pg=WEB-INF/userManger/addUserInfo.jsp">新增</a>
                    <a class="btn btn-warning">清空</a>
                </div>
            </div>
        </div>

    </div>
</form>



    <table class="table">
        <thead>
        <tr>
            <th scope="col">#</th>
            <th scope="col">用户名</th>
            <th scope="col">密码</th>
            <th scope="col">操作</th>
        </tr>
        </thead>
        <tbody>
            <c:forEach items="${sessionScope.userinfoes}" var="userinfo" varStatus="status">
                <tr>
                    <th scope="row">${status.index+1}</th>
                    <td>${userinfo.username}</td>
                    <td>${userinfo.userpwd}</td>
                    <td>
                        <a href="getOneUserInfoServlet?userid=${userinfo.id}" class="btn btn-primary">修改</a>
                        <a class="btn btn-danger">删除</a>
                    </td>
                </tr>
            </c:forEach>
        </tbody>
    </table>
</body>
</html>
